]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overviewControls: Stop transitions when starting a gesture
authorSebastian Keller <skeller@gnome.org>
Thu, 29 Apr 2021 13:51:11 +0000 (15:51 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 29 Apr 2021 17:58:45 +0000 (17:58 +0000)
When starting a gesture to open the overview while a transition to hide
the overview is running, Overview._shown will be first set to false when
starting the transition and then to true by the gesture before the
`onComplete` callback is called. The `onComplete` callback in this case
is `Overview._hideDone()` which starts a transition to show the overview
again which also emits the `showing` signal. Since the gesture emits a
`showing` signal as well, this results in two consecutive `showing`
signals without a `hiding` signal in between.

This breaks the `searchControler` which adds a key press handler to
start the search on `showing` and removes it on `hiding`. So every time
this happens a new handler that will never be removed is added,
resulting in the first key press being repeated.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4004
Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3819
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1828>

js/ui/overviewControls.js

index 811d7c2023f5a4c42cdc4bc09704caa3870ef85a..13535d0689abb46c39eb8705da404b0eeee6d9e5 100644 (file)
@@ -728,6 +728,7 @@ class ControlsManager extends St.Widget {
         const cancelProgress = transition
             ? transition.get_interval().peek_final_value()
             : Math.round(progress);
+        this._stateAdjustment.remove_transition('value');
 
         tracker.confirmSwipe(baseDistance, points, progress, cancelProgress);
         this._workspacesDisplay.prepareToEnterOverview();